import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppComponent } from './app.component';
import { NgxEchartsModule } from 'ngx-echarts';
import { EchartComponent } from './echart/echart.component';
import { ShellComponent } from './shell/shell.component';
import { BookListComponent } from './book-list/book-list.component';
import { AppRoutingModule } from './app-routing.module';
import { pub2sub } from './pub2subService';

@NgModule({
  declarations: [
    AppComponent,
    EchartComponent,
    ShellComponent,
    BookListComponent
  ],
  imports: [
    NgxEchartsModule.forRoot({
      /**
       * This will import all modules from echarts.
       * If you only need custom modules,
       * please refer to [Custom Build] section.
       */
      echarts: () => import('echarts'), // or import('./path-to-my-custom-echarts')
    }),
    BrowserModule,
    AppRoutingModule
  ],
  providers: [
    pub2sub//发布订阅服务
  ],
  bootstrap: [AppComponent,ShellComponent]
})
export class AppModule { }

